/* 全局样式和背景 */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 登录/注册卡片容器 */
.form-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* 平台标题 */
.form-container h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.form-container p.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

/* 输入框组 */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px; /* 左边距留给图标 */
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box; /* 保证 padding 不会撑大宽度 */
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* 提交按钮 */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    background-color: #007bff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn.register {
    background-color: #28a745;
}

.btn.register:hover {
    background-color: #218838;
}

/* 页面切换链接 */
.switch-link {
    margin-top: 20px;
    font-size: 14px;
}

.switch-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.switch-link a:hover {
    text-decoration: underline;
}

/* Flash 消息提示 */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    text-align: center;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}